from some.r3 import Loop
import time


class Man(Loop):
    def __init__(self, birthday):
        super(Man, self).__init__(3, 4, c=5)
        self.birthday = birthday

    def __setattr__(self, key, value):
        if key == 'birthday':
            self.age = 2019 - value[0]

        super().__setattr__(key, value)


if __name__ == '__main__':
    m = Man(time.strptime('1989-06-28', '%Y-%m-%d'))
    print(m.__dict__)
